$(function(){
	//轮播图
	var index = 0,
		timer =null;
	var length = $('.cont-top-lf li').length,
		liHeight = $('.cont-top-rg-news li').height();

		timer = setInterval(move,3000);
		function move(){
			index++;
			if(index>=length){
				index=0
			}
			$('.cont-top-lf li').eq(index).stop(true).fadeIn(500).siblings().fadeOut();
			$('.cont-top-rg-news').stop(true).animate({marginTop:-index*liHeight+100+'px'},500);
		}
		
		//鼠标停留
		$('.cont-top').hover(function(){
			clearInterval(timer);
		},function(){
			timer = setInterval(move,3000);
		})
		
		//按钮点击
		$('.cont-top-rg-btn span')[0].onclick=function(){
			index-=2;
			if(index<-1){
				index = length-2;
			}
			move()
		};
		$('.cont-top-rg-btn span')[1].onclick=function(){
			move()
			
		};
		
		
		
});
$(function(){
	//滚动监听
	$(window).scroll(function(){
		var windowH = $(window).height(),
		scrollT = $(window).scrollTop();
		if(($('.news-software-right').offset().top-scrollT)<(windowH-$('.news-software-right').height()/2)){
			$('.news-software-right').css({
				 animation:"world_mov1 2s"
			})
		}
		if(($('.anli-bt').offset().top-scrollT)<(windowH-$('.anli-bt').height()/2)){
			$('.anli-bt').css({
				'opacity':'1',
				'transform':'translateY(0)'
			});
			$('.anli-cont').css({
                animation:"anli_scale 2s forwards",
                transform: "translateY(0)",
                opacity: "1"
            });
		}
		
	})
});


